package cn.paplink.deviceinfo;

import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TextView textView = (TextView) findViewById(R.id.resolution1);
        if (textView != null) {
            textView.setText(MyApplication.mDevDisplaySize);
        }
        textView = (TextView) findViewById(R.id.resolution2);
        if (textView != null) {
            textView.setText(MyApplication.mDevDisplaySize2);
        }
        textView = (TextView) findViewById(R.id.resolution3);
        if (textView != null) {
            textView.setText(MyApplication.mAppDisplaySize);
        }
        textView = (TextView) findViewById(R.id.resolution4);
        if (textView != null) {
            textView.setText(MyApplication.mAppDisplaySize2);
        }

        textView = (TextView) findViewById(R.id.manufacturer);
        if (textView != null) {
            textView.setText(MyApplication.mManufacturer);
        }
        textView = (TextView) findViewById(R.id.manufacturer2);
        if (textView != null) {
            textView.setText(Build.MANUFACTURER);
        }

        textView = (TextView) findViewById(R.id.platform);
        if (textView != null) {
            textView.setText(MyApplication.mPlatform);
        }
        textView = (TextView) findViewById(R.id.platform2);
        if (textView != null) {
            textView.setText(Build.PRODUCT);
        }

        textView = (TextView) findViewById(R.id.model);
        if (textView != null) {
            textView.setText(MyApplication.mModel);
        }
        textView = (TextView) findViewById(R.id.model2);
        if (textView != null) {
            textView.setText(Build.MODEL);
        }

        textView = (TextView) findViewById(R.id.android);
        if (textView != null) {
            textView.setText(MyApplication.mAndroidVer);
        }
        textView = (TextView) findViewById(R.id.android2);
        if (textView != null) {
            textView.setText(Build.VERSION.RELEASE+"("+Build.VERSION.SDK_INT+")");
        }
        textView = (TextView) findViewById(R.id.android3);
        if (textView != null) {
            textView.setText(Util.getAndroidVer(Build.VERSION.SDK_INT));
        }

        textView = (TextView) findViewById(R.id.decoder);
        if (textView != null) {
            textView.setText(MyApplication.mDecoderName);
        }
    }
}
